<%@ Control Language="VB" AutoEventWireup="false" CodeFile="ImageLib.ascx.vb" Inherits="atomcontrols_controls_ImageLib" %>
<asp:XmlDataSource ID="XmlImageLib" runat="server" XPath="images/img"></asp:XmlDataSource>

<ul id="SW_gallery">
<asp:DataList ID="ImageList" runat="server"
    RepeatDirection="Horizontal" CellPadding="20" DataKeyField="src" OnDeleteCommand="Delete_Command" RepeatLayout="Flow">
    <ItemTemplate>
        <li>
			<input class="imagealt" type="hidden" value="<%# Eval("alt") %>" />
			<input class="imagename" type="hidden" value="<%# Eval("src") %>" />
			<asp:Image ID="img" runat="server" AlternateText='<%# Bind("alt") %>' ImageUrl='<%# Eval("src", "~/atomcontrols/createthumbnail.aspx?image=~/user/images/{0}&size=100&force=v") %>' ToolTip='<%# Bind("alt") %>' />
        
			<ul class="sw_imageNav">
				<li><%# Eval("w")%>x<%#Eval("h") %></li>
				<li><asp:LinkButton id="DeleteButton" Text="Delete" CommandName="Delete" runat="server"/></li>
			</ul>
		</li>
		
    </ItemTemplate>
</asp:DataList>
</ul>
<fieldset>
	<legend>Upload an Image</legend>
	<dl id="SW_upload">
		<dt><label for="ImgLib_FileUpload">Upload an image:</label></dt>
		<dd><asp:FileUpload ID="FileUpload" runat="server" EnableViewState="False" /></dd>
			
		<dt><label for="ImgLib_txtAlt">Description (Alt tag):</dt>
		<dd><asp:TextBox ID="txtAlt" runat="server" Columns="30" Rows="3" TextMode="MultiLine"></asp:TextBox></dd>
	</dl>
</fieldset>
<asp:Button ID="btnUpload" runat="server" EnableViewState="False" Text="Upload Image" />
<asp:Literal ID="lblError" runat="server" EnableViewState="False" Visible="False"></asp:Literal>
<asp:Literal ID="lblSuccess" runat="server" EnableViewState="False" Visible="False"><p>{0} has been successfully uploaded to the server.</p></asp:Literal>
